package com.kingyun.gpsinspection.purificationservice.services.tdm.innerservice.impl;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.tdm.FlowCloseMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.FlowCloseVo;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.FlowCloseService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by sugongche on 2017/4/20.
 */
public class FlowCloseServiceImpl implements FlowCloseService {
    @Autowired
    private FlowCloseMapper flowCloseMapper;

    @Override
    public FlowCloseVo queryByTaskId(String taskId) throws Exception {
        List<FlowCloseVo> list = flowCloseMapper.selectByTaskId(taskId);

        FlowCloseVo flowCloseVo = new FlowCloseVo();

        if (list != null) {
            flowCloseVo = list.get(0);
        }

        return flowCloseVo;
    }
}
